#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QPushButton>

// https://wiki.qt.io/Qt_for_Beginners

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    // Set size of the window
    setFixedSize(100, 50);

    // Create and position the button
    m_button = new QPushButton("Hello World", this);
    m_button->setGeometry(10, 10, 80, 30);

    // NEW : Do the connection
    connect(m_button, SIGNAL (clicked()), QApplication::instance(), SLOT (quit()));
}

MainWindow::~MainWindow()
{
    delete ui;
}

